<template>
  <div>手写Promise</div>
</template>
<script setup>
import { MyPromise } from './myPromise'

let a = new MyPromise((resolve, reject) => {
  setTimeout(() => {
    reject("成功")
  }, 1000)
})

a.then(123, (res) => {
  console.log("🚀 ~ a.then ~ res:", res)
  return '123'
}).then(res => {
  console.log("🚀 ~ a.then ~ res:", res)
})
console.log("🚀 ~ a ~ a:")

</script>
<style>
</style>